﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Core;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.ComponentModel;

namespace Data.DataGet
{
   public class _ChiTietHDB
    {
       DataProvider ob = new SQLProvider();
       public int Insert_ChiTietHDB(string MaCTHDB, string MaHDB, string MaDT, string IMEI, float DonGia)
       {
           string SPName = "insert_ChiTietHDB";
           SqlParameter[] para = new SqlParameter[5];
           para[0] = new SqlParameter("@MaCTHDB", MaCTHDB);
           para[1] = new SqlParameter("@MaHDB", MaHDB);
           para[2] = new SqlParameter("@MaDT", MaDT);
           para[3] = new SqlParameter("@IMEI", IMEI);
           para[4] = new SqlParameter("@DonGia", DonGia);
           if (ob.Execute_Modify(SPName, para) >= 1)

               return 1;
           else
               return 0;
       }
       public DataTable TestIMEI(string s)
       {
           DataTable ds = new DataTable();
           string strSQL = "select MaHDB,IMEI from ChiTietHDB where IMEI = '" + s + "'";
           return ds = ob.Execute_Table(strSQL);
       }
    }
}
